public class Object {

        private String name; 
        private Icon icon;
        private Type t ;
        
        public Object(){
                name = "";
                icon = null;
                t = null;
        }
        
        public Object (String nameOfObject){
                name = nameOfObject ;
                icon = null;
                t = new Type();
        }
        
        public Object (String nameOfObject, Type t){
                name = nameOfObject ;
                this.t = t;
        }
        
        
                public Icon ConstructIconWithNameOnIt(String nameOnIcon , Icon i){
                        // this will construct a new Icon that has the image of icon i, but with
                        // the string nameOnIcon on the top of it.
                         i.setName(nameOnIcon);
                         // here we write the code that change position of the name .
                        return i;
                }
        
        public Icon linkObjectWithIcon(String n , Icon i){
Icon x = new Icon ();
                
                
                return x;
        }
   
  public void display(){
	 System.out.println("=============================================");
     System.out.println ("The name of the object is : "+ getName());
     System.out.println ("The icon of the object is : "+ getIcon());
     System.out.println ("The type of the object is : "+ getT().getName());
     System.out.println("=============================================");
  }

        public String getName() {
                return name;
        }

        public Icon getIcon() {
                return icon;
        }

        public Type getT() {
                return t;
        }

        public void setName(String name) {
                this.name = name;
        }

        public void setIcon(Icon icon) {
                this.icon = icon;
        }

        public void setT(Type t) {
                this.t = t;
        }
        public void setT2(String n) {
			t.setName(n);
		}
        
        
}
